import request from '@/utils/request'

/**
 * ------------------------
 *  这里是数据字典的查询
 * ------------------------
 */

//查询对应数据字典类型
export function getDicts(dictType) {
	return request({
		url: '/sys/dict/data/type/' + dictType,
		method: 'get'
	})
}

//查询所有地址集合(树形结构)
export function getAllAddressTree(){
	return request({
		url:'/sys/base/address/getAllInfoTree',
		method:'get'
	})
}

//查询地址
export function getAddress() {
	return request({
		url: '/sys/base/address/getAllInfo',
		method: 'get'
	})
}

// 获取省集合
export function getProvince(){
	return request({
		url:'/sys/base/address/getProvince',
		method:'get'
	})
}

//获取市集合
export function getCity(parentId){
	return request({
		url:'/sys/base/address/getCity?parentId='+parentId,
		method:'get'
	})
}

//获取区集合
export function getDistrict(parentId){
	return request({
		url:'/sys/base/address/getDistrict?parentId='+parentId,
		method:'get'
	})
}